home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc1_2_x / golfnlys.sit / Golf Analyst 1.0 / card_4003.txt < prev    next >
Text File  |  1989-11-06  |  11KB  |  416 lines

  1. -- card: 4003 from stack: in.0
  2. -- bmap block id: 4217
  3. -- flags: 4000
  4. -- background id: 3747
  5. -- name: SCORE BOARD
  6.  
  7.  
  8. -- part 21 (button)
  9. -- low flags: 00
  10. -- high flags: 8003
  11. -- rect: left=400 top=88 right=111 bottom=505
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: New Course
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   set Lockscreen to true
  23.   go to Card 2
  24.   doMenu "Copy Card"
  25.   doMenu "Paste Card"
  26.   set hilite of button "Fwy1" to false
  27.   set hilite of button "Fwy2" to false
  28.   set hilite of button "Fwy3" to false
  29.   set hilite of button "Fwy4" to false
  30.   set hilite of button "Fwy5" to false
  31.   set hilite of button "Fwy6" to false
  32.   set hilite of button "Fwy7" to false
  33.   set hilite of button "Fwy8" to false
  34.   set hilite of button "Fwy9" to false
  35.   set hilite of button "Fwy10" to false
  36.   set hilite of button "Fwy11" to false
  37.   set hilite of button "Fwy12" to false
  38.   set hilite of button "Fwy13" to false
  39.   set hilite of button "Fwy14" to false
  40.   set hilite of button "Fwy15" to false
  41.   set hilite of button "Fwy16" to false
  42.   set hilite of button "Fwy17" to false
  43.   set hilite of button "Fwy18" to false
  44.   set hilite of button "SS1" to false
  45.   set hilite of button "SS2" to false
  46.   set hilite of button "SS3" to false
  47.   set hilite of button "SS4" to false
  48.   set hilite of button "SS5" to false
  49.   set hilite of button "SS6" to false
  50.   set hilite of button "SS7" to false
  51.   set hilite of button "SS8" to false
  52.   set hilite of button "SS9" to false
  53.   set hilite of button "SS10" to false
  54.   set hilite of button "SS11" to false
  55.   set hilite of button "SS12" to false
  56.   set hilite of button "SS13" to false
  57.   set hilite of button "SS14" to false
  58.   set hilite of button "SS15" to false
  59.   set hilite of button "SS16" to false
  60.   set hilite of button "SS17" to false
  61.   set hilite of button "SS18" to false
  62.   put empty into field "Score1"
  63.   put empty into field "Score2"
  64.   put empty into field "Score3"
  65.   put empty into field "Score4"
  66.   put empty into field "Score5"
  67.   put empty into field "Score6"
  68.   put empty into field "Score7"
  69.   put empty into field "Score8"
  70.   put empty into field "Score9"
  71.   put empty into field "Score10"
  72.   put empty into field "Score11"
  73.   put empty into field "Score12"
  74.   put empty into field "Score13"
  75.   put empty into field "Score14"
  76.   put empty into field "Score15"
  77.   put empty into field "Score16"
  78.   put empty into field "Score17"
  79.   put empty into field "Score18"
  80.   put empty into field "PT1"
  81.   put empty into field "PT2"
  82.   put empty into field "PT3"
  83.   put empty into field "PT4"
  84.   put empty into field "PT5"
  85.   put empty into field "PT6"
  86.   put empty into field "PT7"
  87.   put empty into field "PT8"
  88.   put empty into field "PT9"
  89.   put empty into field "PT10"
  90.   put empty into field "PT11"
  91.   put empty into field "PT12"
  92.   put empty into field "PT13"
  93.   put empty into field "PT14"
  94.   put empty into field "PT15"
  95.   put empty into field "PT16"
  96.   put empty into field "PT17"
  97.   put empty into field "PT18"
  98.   put empty into field "Par1"
  99.   put empty into field "Par2"
  100.   put empty into field "Par3"
  101.   put empty into field "Par4"
  102.   put empty into field "Par5"
  103.   put empty into field "Par6"
  104.   put empty into field "Par7"
  105.   put empty into field "Par8"
  106.   put empty into field "Par9"
  107.   put empty into field "Par10"
  108.   put empty into field "Par11"
  109.   put empty into field "Par12"
  110.   put empty into field "Par13"
  111.   put empty into field "Par14"
  112.   put empty into field "Par15"
  113.   put empty into field "Par16"
  114.   put empty into field "Par17"
  115.   put empty into field "Par18"
  116.   put empty into Field "IN"
  117.   put empty into Field "OUT"
  118.   put empty into Field "Total"
  119.   put empty into Field "Greens"
  120.   put empty into Field "Fairways"
  121.   put empty into Field "Sand Saves"
  122.   put empty into Field "Putts"
  123.   put empty into Field "Date"
  124.   put empty into Field "Over Par"
  125.   put empty into Field "Eagle"
  126.   put empty into Field "Birdie"
  127.   put empty into Field "Par"
  128.   put empty into Field "Bogey"
  129.   put empty into Field "Double Bogey"
  130.   put empty into Field "Others"
  131.   put empty into Field "Course Name"
  132.   put empty into Field "Rating"
  133.   set Lockscreen to false
  134. end mouseUp
  135.  
  136.  
  137.  
  138. -- part 22 (button)
  139. -- low flags: 00
  140. -- high flags: 8003
  141. -- rect: left=404 top=122 right=144 bottom=504
  142. -- title width / last selected line: 0
  143. -- icon id / first selected line: 0 / 0
  144. -- text alignment: 1
  145. -- font id: 0
  146. -- text size: 12
  147. -- style flags: 0
  148. -- line height: 16
  149. -- part name: Update Board
  150. ----- HyperTalk script -----
  151. on mouseUp
  152.   set Lockscreen to true
  153.   set cursor to 2
  154.   sort descending datetime by field "Date"
  155.   if the number of cards > 21 then
  156.     go to card 21
  157.     repeat the number of cards - 21
  158.       doMenu "Delete Card"
  159.     end repeat
  160.   end if
  161.   sort numeric by field "Total"
  162.   put 0 into num
  163.   put 0 into totscore
  164.   put 0 into totfairways
  165.   put 0 into totss
  166.   put 0 into totgreens
  167.   put 0 into totput
  168.  
  169.   go to next card
  170.   put field "total" into best
  171.  
  172.   repeat number of cards - 1
  173.     add 1 to num
  174.     put field "Total" - field "Rating" into temp
  175.     if temp < 0 then put 0 into temp
  176.     if num <= 10 then add temp to totscore
  177.     add field "Fairways" to totfairways
  178.     add field "Sand Saves" to totss
  179.     add field "Putts" to totput
  180.     add field "Greens" to totgreens
  181.     go to next card
  182.   end repeat
  183.  
  184.   sort descending datetime by field "Date"
  185.   put 0 into num2
  186.   put 0 into fiveholes
  187.   put 0 into tenholes
  188.  
  189.   repeat the number of cards - 1
  190.     add 1 to num2
  191.     put field "Total" - field "Rating" into temp
  192.     if temp < 0 then put 0 into temp
  193.     if num2 <= 5 then add temp to fiveholes
  194.     if num2 <= 10 then add temp to tenholes
  195.     go to next card
  196.   end repeat
  197.  
  198.   sort numeric by field "Total"
  199.   put fiveholes * 9.6 into fiveholes
  200.   put tenholes * 9.6 into tenholes
  201.   put totscore * 9.6 into totscore
  202.   if num > 5 then
  203.     divide fiveholes by 5
  204.   else
  205.     divide fiveholes by num
  206.   end if
  207.   if num > 10 then
  208.     divide tenholes by 10
  209.     divide totscore by 10
  210.   else
  211.     divide tenholes by num
  212.     divide totscore by num
  213.   end if
  214.   put round(fiveholes) / 10 into field "Five Holes"
  215.   put round(tenholes) / 10 into field "Ten Holes"
  216.   put round(totscore) / 10 into field "USGA SCORE"
  217.   put best into field "BEST"
  218.   put round(totfairways/num) into field "Fairways"
  219.   put round(totss/num) into field "Sand Saves"
  220.   put round(totgreens/num) into field "greens"
  221.   put round(totput/num) into field "Putts"
  222.   set Lockscreen to false
  223. end mouseUp
  224.  
  225.  
  226.  
  227. -- part 24 (button)
  228. -- low flags: 00
  229. -- high flags: 0000
  230. -- rect: left=21 top=118 right=142 bottom=46
  231. -- title width / last selected line: 0
  232. -- icon id / first selected line: 1014 / 1014
  233. -- text alignment: 1
  234. -- font id: 0
  235. -- text size: 12
  236. -- style flags: 0
  237. -- line height: 16
  238. -- part name: Previous
  239. ----- HyperTalk script -----
  240. on mouseUp
  241.   visual effect scroll right
  242.   go to previous card
  243. end mouseUp
  244.  
  245.  
  246.  
  247. -- part 25 (button)
  248. -- low flags: 00
  249. -- high flags: 0000
  250. -- rect: left=353 top=118 right=142 bottom=378
  251. -- title width / last selected line: 0
  252. -- icon id / first selected line: 1013 / 1013
  253. -- text alignment: 1
  254. -- font id: 0
  255. -- text size: 12
  256. -- style flags: 0
  257. -- line height: 16
  258. -- part name: Next
  259. ----- HyperTalk script -----
  260. on mouseUp
  261.   visual effect scroll left
  262.   go to next card
  263. end mouseUp
  264.  
  265.  
  266.  
  267. -- part 26 (button)
  268. -- low flags: 00
  269. -- high flags: 0000
  270. -- rect: left=314 top=118 right=144 bottom=345
  271. -- title width / last selected line: 0
  272. -- icon id / first selected line: 2478 / 2478
  273. -- text alignment: 1
  274. -- font id: 0
  275. -- text size: 12
  276. -- style flags: 0
  277. -- line height: 16
  278. -- part name: About
  279. ----- HyperTalk script -----
  280. on mouseUp
  281.   set LockScreen to true
  282.   set visible of card field "About2" to true
  283.   set visible of card field "About" to true
  284.   set Lockscreen to false
  285. end mouseUp
  286.  
  287.  
  288.  
  289. -- part 27 (button)
  290. -- low flags: 00
  291. -- high flags: 0000
  292. -- rect: left=63 top=118 right=144 bottom=94
  293. -- title width / last selected line: 0
  294. -- icon id / first selected line: 21700 / 21700
  295. -- text alignment: 1
  296. -- font id: 0
  297. -- text size: 12
  298. -- style flags: 0
  299. -- line height: 16
  300. -- part name: go Home
  301. ----- HyperTalk script -----
  302. on mouseUp
  303.   go home
  304.  
  305. end mouseUp
  306.  
  307.  
  308.  
  309. -- part 28 (field)
  310. -- low flags: 81
  311. -- high flags: 0000
  312. -- rect: left=134 top=22 right=38 bottom=323
  313. -- title width / last selected line: 0
  314. -- icon id / first selected line: 0 / 0
  315. -- text alignment: 0
  316. -- font id: 3
  317. -- text size: 12
  318. -- style flags: 0
  319. -- line height: 16
  320. -- part name: date
  321.  
  322.  
  323. -- part 29 (field)
  324. -- low flags: 81
  325. -- high flags: 0004
  326. -- rect: left=80 top=70 right=279 bottom=509
  327. -- title width / last selected line: 0
  328. -- icon id / first selected line: 0 / 0
  329. -- text alignment: 0
  330. -- font id: 2
  331. -- text size: 12
  332. -- style flags: 0
  333. -- line height: 16
  334. -- part name: About
  335. ----- HyperTalk script -----
  336. on mouseUp
  337.   set LockScreen to true
  338.   set visible of card field "About2" to false
  339.   set visible of card field "About" to false
  340.   set Lockscreen to false
  341. end mouseUp
  342.  
  343.  
  344.  
  345. -- part 30 (field)
  346. -- low flags: 81
  347. -- high flags: 0000
  348. -- rect: left=135 top=70 right=103 bottom=460
  349. -- title width / last selected line: 0
  350. -- icon id / first selected line: 0 / 0
  351. -- text alignment: 0
  352. -- font id: 20
  353. -- text size: 24
  354. -- style flags: 256
  355. -- line height: 32
  356. -- part name: About2
  357. ----- HyperTalk script -----
  358. on mouseUp
  359.   set LockScreen to true
  360.   set visible of card field "About2" to false
  361.   set visible of card field "About" to false
  362.   set Lockscreen to false
  363. end mouseUp
  364.  
  365.  
  366.  
  367. -- part contents for background part 6
  368. ----- text -----
  369. 81
  370.  
  371. -- part contents for background part 3
  372. ----- text -----
  373. 10.1
  374.  
  375. -- part contents for background part 4
  376. ----- text -----
  377. 10.1
  378.  
  379. -- part contents for background part 5
  380. ----- text -----
  381. 10.1
  382.  
  383. -- part contents for background part 7
  384. ----- text -----
  385. 56
  386.  
  387. -- part contents for background part 8
  388. ----- text -----
  389. 50
  390.  
  391. -- part contents for background part 9
  392. ----- text -----
  393. 61
  394.  
  395. -- part contents for background part 10
  396. ----- text -----
  397. 67
  398.  
  399. -- part contents for card part 29
  400. ----- text -----
  401.              
  402.                            
  403.  
  404.    This stack is FREE!!!  If you like it send me a line or two about  
  405.    your favorite home courses.  I'm a graduate student in CS who 
  406.    loves to Golf and will be graduating in May.  I hope this stack 
  407.    will help you iron out your game.  Mail replies to:
  408.  
  409.                         US Mail:   Erik Bleyl
  410.                                         23-8 Copeley Hill
  411.                                         Charlottesville, VA  22903
  412.                         Email:      erb2x@uvacs.cs.virginia.edu
  413.  
  414. -- part contents for card part 30
  415. ----- text -----
  416. Golf Analyst by Erik Bleyl